Xbasic
a5queueing::queueEnqueue Method
Syntax
.Enqueue as A5Storage::CallResult (item as A5Queueing::QueueItem)
Arguments
- itemA5Queueing::QueueItem
Item to enqueue.
Returns
- resultA5Storage::CallResult
call result.
Description
Enqueue an item to the queue.
Example
dim qm as A5Queueing::Queue = null_value()
dim item as A5Queueing::QueueItem = null_value()
' Calculate queue url from Account + Region
if A5Queueing::Queue::Open(qm,"Provider='RabbitMQ';Host='localhost';Queue='TestQ';").success then
item = qm.CreateQueueItem()
item.Body = "Hello RabbitMQ"
' Add the item we created to the queue
dim callresult as p = qm.Enqueue(item)
if callresult.Error then
ui_msg_box("Error",callresult.MessageToDisplay)
end if
end if